package utils;

import java.util.List;

import entity.Product;

/**
 * 分页工具类
 * @author Administrator
 *
 */
public class PageUtils<T> {

	private	int currPage=1;
	private int pageSize=4;
	private int totalCount;
	private int totalPage;
	private List<T>  list;

	public int getCurrPage() {
		return currPage;
	}
	public void setCurrPage(int currPage) {
		this.currPage = currPage;
	}
	public int getPageSize() {
		return pageSize;
	}
	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
		
		this.totalPage=this.totalCount/pageSize;

		if(totalCount%pageSize !=0){
			this.totalPage++;
		}
	}
	public int getTotalCount() {
		return totalCount;
	}
	public void setTotalCount(int totalCount) {
		this.totalCount = totalCount;

		this.totalPage=this.totalCount/pageSize;

		if(totalCount%pageSize !=0){
			this.totalPage++;
		}

	}
	public int getTotalPage() {
		return totalPage;
	}
	public void setTotalPage(int totalPage) {
		this.totalPage = totalPage;
	}
	public List<T> getList() {
		return list;
	}
	public void setList(List<T> list) {
		this.list = list;
	}
}
